// import { ColumnsType } from 'ant-design-vue/lib/table'

import { APPFN_SET_VALUE_MAP } from '@/utils'
//列表字段
export const columnsList = [
  {
    title: '名称',
    dataIndex: 'configName',
    minWidth: 150,
    showEllipsis: true
  },
  {
    title: '业务类型',
    dataIndex: 'businessType',
    width: 120,
    ellipsis: { showTitle: true }
  },
  {
    title: '试验类型',
    dataIndex: 'projectTypeName',
    width: 150,
    showEllipsis: true
  },
  {
    title: '状态',
    dataIndex: 'status',
    width: 90
  },
  {
    title: '创建人',
    dataIndex: 'createUserName',
    width: 120,
    showEllipsis: true
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 170,
    showEllipsis: true
  },
  // {
  //   title: '最后编辑人',
  //   dataIndex: 'lastEditUserName',
  //   width: 120,
  //   showEllipsis: true
  // },
  // {
  //   title: '最后编辑时间',
  //   dataIndex: 'lastEditTime',
  //   width: 170,
  //   showEllipsis: true
  // },
  {
    title: '操作',
    dataIndex: 'edit',
    width: 240,
    align: 'left',
    fixed: 'right'
  }
]
export const businessTypeList = [
  {
    label: '接收入库',
    value: 1
  },
  {
    label: '发放',
    value: 2
  },
  {
    label: '回收',
    value: 3
  },
  {
    label: '退回',
    value: 4
  },
  {
    label: '管控',
    value: 5,
    hideForm: true,
    hideFlow: true
  },
  {
    label: '移库',
    value: 6,
    hideFlow: true
  },
  {
    label: '销毁',
    value: 7
  },
  {
    label: '盘点',
    value: 8,
    hideFlow: true,
    hideProjectType: true
  }
]
export interface filterFormType {
  businessType: string | undefined
  projectTypeList: string[]
  status: number | undefined
  orgId: string
}
export const businessTypeListMap = APPFN_SET_VALUE_MAP(businessTypeList)
//  停/启用状态
export enum StatusEnum {
  ENABLE = 1, // 启用
  STOP = 0 // 停用
}

export const STATUS_LIST = [
  {
    value: StatusEnum.ENABLE,
    color: 'success',
    label: '启用',
    icon: 'task-status5',
    prefix: 'icon-task'
  },
  {
    value: StatusEnum.STOP,
    color: 'error',
    label: '停用',
    icon: 'task-status6',
    prefix: 'icon-task'
  }
]
export const STATUS_MAP = APPFN_SET_VALUE_MAP(STATUS_LIST)
